import random
times = eval(input('请输入你希望模拟的次数：'))
pick_first_n = 0
pick_change_n = 0
for i in range(times):
    car = random.randint(0, 2)
    pick_first = random.randint(0, 2)
    if pick_first == car:
        pick_first_n += 1
    else:
        pick_change_n += 1
pick_first_percent = pick_first_n / times
pick_change_percent = pick_change_n / times
print('如果坚持初选，胜率为{:.2f}%'.format(pick_first_percent * 100))
print('如果改变初选，胜率为{:.2f}%'.format(pick_change_percent * 100))
